/*
 * @Author: 曹宪辉
 * @Date: 2022-01-01 01:01:19
 * @Description: 
 * @FilePath: \RDA\src\RDA\RDAClient.java
 */
package RDA;

import java.util.Objects;

public class RDAClient {
    String ip;
    int port;

    public RDAClient(String ip, int port, int timeout) {
        this.ip = ip;
        this.port = port;
        this.timeout = timeout;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public int getPort() {
        return port;
    }

    public void setPort(int port) {
        this.port = port;
    }

    public int getTimeout() {
        return timeout;
    }

    public void setTimeout(int timeout) {
        this.timeout = timeout;
    }

    int timeout;

    @Override
    public boolean equals(Object o) {
        if (this == o) {return true;}
        if (o == null || getClass() != o.getClass()) {return false;}
        RDAClient rdaClient = (RDAClient) o;
        return port == rdaClient.port && ip.equals(rdaClient.ip);
    }

    @Override
    public int hashCode() {
        return Objects.hash(ip, port);
    }
}
